//
// Author: Vladimir Migashko <migashko@gmail.com>, (C) 2011
//
// Copyright: See COPYING file that comes with this distribution
//

#ifndef FASYS_LIBS_CHANNEL_CLIENT_CHANNEL_CLIENT_HPP
#define FASYS_LIBS_CHANNEL_CLIENT_CHANNEL_CLIENT_HPP

#include <fas/mux/imux.hpp>
#include "client_config.hpp"
#include "iclient_callback.hpp"

/*
#include "channels/message.hpp"
#include "channel-service/subscribe.hpp"
*/
#include "types.hpp"


namespace fasys{ namespace client{ namespace channel{

  /*
typedef ::fasys::channels::message message;
typedef ::fasys::channels::basic_message basic_message;
typedef ::fasys::service::channel::subscribe subscribe;
  */

class client_impl;

class channel_client
{
public:
  virtual ~channel_client();
  channel_client();
  void start( fas::mux::imux<>* mux, const client_config& conf );
  void stop();

  void callback(iclient_callback* cb);
  void send(const message_publish& cmd);
  void send(const subscribe_request& cmd);
private:
  client_impl* _client;
};

}}}

#endif
